<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>员工信息展示页面</title>
    <style type="text/css">
        table {
            border-collapse: collapse;
            margin: 0px auto 0px auto;
        }

        table th, td {
            border: 1px solid black;
            text-align: center;
        }
    </style>
</head>
<body>
<table>
    <tr>
        <th>ID</th>
        <th>NAME</th>
        <th>SALARY</th>
    </tr>
    <tbody th:if="${#lists.isEmpty(list)}">
    <tr>
        <td colspan="3">抱歉！没有查询到数据！</td>
    </tr>
    </tbody>
    <tbody th:if="${not #lists.isEmpty(list)}">
    <tr th:each="emp : ${list}">
        <td th:text="${emp.empId}">这里显示员工ID</td>
        <td th:text="${emp.empName}">这里显示员工NAME</td>
        <td th:text="${emp.empSalary}">这里显示员工SALARY</td>
    </tr>
    </tbody>
</table>

        <div style="text-align: center">
            <a th:href="@{/}">回主页</a>
        </div>



</body>
</html>